from ..utils.db import db
from tzlocal import get_localzone
from datetime import datetime


class User(db.Model):
    __tablename__ = "user"

    id = db.Column(db.BIGINT, autoincrement=True, primary_key=True)
    name = db.Column(db.String)
    password = db.Column(db.String)
    type = db.Column(db.Integer, default=0)
    avatar = db.Column(db.String)
    ssoToken = db.Column(db.String, name="sso_token")
    token = db.Column(db.String)
    create = db.Column(db.DateTime, default=datetime.now(get_localzone()))
